xen.git
17 years agoRevert dependency on new GNUMake feature.
Keir Fraser [Wed, 9 Jul 2008 09:37:20 +0000 (10:37 +0100)]
Revert dependency on new GNUMake feature.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agostubdom: use a newlib snapshot instead of the slow cvs checkout.
Keir Fraser [Tue, 8 Jul 2008 16:25:04 +0000 (17:25 +0100)]
stubdom: use a newlib snapshot instead of the slow cvs checkout.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: do not build tapdisk as it it not supposed to build and we don't need it
Keir Fraser [Tue, 8 Jul 2008 16:15:23 +0000 (17:15 +0100)]
stubdom: do not build tapdisk as it it not supposed to build and we don't need it

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoChange PCI-dump debug key: Fixes boot with debug=y and perfc=y
Keir Fraser [Tue, 8 Jul 2008 16:03:53 +0000 (17:03 +0100)]
Change PCI-dump debug key: Fixes boot with debug=y and perfc=y
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agostubdom: fix copy/paste typo in select()
Keir Fraser [Tue, 8 Jul 2008 15:12:23 +0000 (16:12 +0100)]
stubdom: fix copy/paste typo in select()

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoImprove plumbing for calling external qemu builds
Keir Fraser [Tue, 8 Jul 2008 13:26:09 +0000 (14:26 +0100)]
Improve plumbing for calling external qemu builds

* Remove ioemu-dir before replacing it with a symlink so that
  switching between trees doesn't go wrong.
* Remove case-based arrangement for making XEN_ROOT absolute
  and replace with $(abspath ...) since we depend on GNU make
  anyway.
* `make clean' recurses into ioemu-dir

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
17 years agostubdom: Fix modified_memory size calculation
Keir Fraser [Tue, 8 Jul 2008 11:24:14 +0000 (12:24 +0100)]
stubdom: Fix modified_memory size calculation
>> is less prioritized than -

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agopvSCSI: fix xend
Keir Fraser [Tue, 8 Jul 2008 08:28:50 +0000 (09:28 +0100)]
pvSCSI: fix xend

Previous "xend" assumed initial Xenbus state would be "Connected" when
LUN hot-plug starts. However it was not guaranteed in general, and it
may cause some problems.

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
17 years agoFix passthrough of PCI capability structures.
Keir Fraser [Tue, 8 Jul 2008 08:26:58 +0000 (09:26 +0100)]
Fix passthrough of PCI capability structures.
Signed-off-by: Naoki Nishiguchi <nisiguti@jp.fujitsu.com>
17 years agoRevert c/s 17975 -- enumerate PCI devices in Xen allowing old dom0
Keir Fraser [Mon, 7 Jul 2008 15:13:53 +0000 (16:13 +0100)]
Revert c/s 17975 -- enumerate PCI devices in Xen allowing old dom0
kernels to work with iommu-capable platforms.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoMTRR virtualization for Intel EPT
Keir Fraser [Mon, 7 Jul 2008 09:45:50 +0000 (10:45 +0100)]
MTRR virtualization for Intel EPT
Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>
17 years agoioemu: e1000: fix a TSE bug
Keir Fraser [Mon, 7 Jul 2008 09:29:56 +0000 (10:29 +0100)]
ioemu: e1000: fix a TSE bug

Previously, all data descriptors used TSE context descriptor. It's not
correct, per spec, data descriptor uses TSE bit to indicate whether
use TSE. Legacy data descripter never use TSE.

Signed-off-by; Anthony Xu <anthony.xu@intel.com>

17 years agoSet default domain_to_node() allocation preference before dropping
Keir Fraser [Sun, 6 Jul 2008 19:16:24 +0000 (20:16 +0100)]
Set default domain_to_node() allocation preference before dropping
domain reference when calling alloc_domheap_pages().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoOnly use domain_to_node() on non-null domain pointer.
Keir Fraser [Sun, 6 Jul 2008 16:22:58 +0000 (17:22 +0100)]
Only use domain_to_node() on non-null domain pointer.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agonuma: Extend MEMOP_ allocation functions to take a node argument.
Keir Fraser [Sat, 5 Jul 2008 13:43:37 +0000 (14:43 +0100)]
numa: Extend MEMOP_ allocation functions to take a node argument.

The address_bits field will be limited to 8 bits and is now embedded
in the mem_flags member, which additionally contains the node number
(limited to 8 bit).

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoUpdate .hgignore list
Keir Fraser [Sat, 5 Jul 2008 13:42:08 +0000 (14:42 +0100)]
Update .hgignore list

17 years agoOOS cleanup: Fixup arrays instead of fixup tables.
Keir Fraser [Sat, 5 Jul 2008 13:01:27 +0000 (14:01 +0100)]
OOS cleanup: Fixup arrays instead of fixup tables.

This patch avoids compromises with evil concepts (reverse maps) in the
shadow code and limits to a maximum value the number of writable
mappings of OOS pages.

Code is simpler and performance do not degrade.

Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
17 years agostubdom: fix pass-through compilation
Keir Fraser [Sat, 5 Jul 2008 13:00:19 +0000 (14:00 +0100)]
stubdom: fix pass-through compilation

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: fix parallel build
Keir Fraser [Sat, 5 Jul 2008 13:00:03 +0000 (14:00 +0100)]
stubdom: fix parallel build

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoUpdate changelog for pci add/remove physdevop hypercalls.
Keir Fraser [Sat, 5 Jul 2008 12:58:27 +0000 (13:58 +0100)]
Update changelog for pci add/remove physdevop hypercalls.

17 years agostubdom: gcc-4.3 support
Keir Fraser [Fri, 4 Jul 2008 17:00:04 +0000 (18:00 +0100)]
stubdom: gcc-4.3 support

It seems we need to provide limits.h in the gcc-4.3 case.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoxen: Fix debug build.
Keir Fraser [Fri, 4 Jul 2008 16:58:40 +0000 (17:58 +0100)]
xen: Fix debug build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoRemove PCI device enumaration in VT-d code
Keir Fraser [Fri, 4 Jul 2008 16:55:33 +0000 (17:55 +0100)]
Remove PCI device enumaration in VT-d code

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
17 years agoAdd hypercall for adding and removing PCI devices
Keir Fraser [Fri, 4 Jul 2008 16:52:50 +0000 (17:52 +0100)]
Add hypercall for adding and removing PCI devices

The add hypercall will add a new PCI device and register it.  The
remove hypercall will remove the pci_dev strucure for the device.  The
IOMMU hardware (if present) will be notifed as well.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
Signed-off-by: Joshua LeVasseur <joshua.levasseur@netronome.com>
17 years agoAdd management and locking of PCI device structures
Keir Fraser [Fri, 4 Jul 2008 16:52:24 +0000 (17:52 +0100)]
Add management and locking of PCI device structures

Add functions for managing pci_dev structures.  Create a list
containing all current pci_devs.  Remove msi_pdev_list.  Create a
read-write lock protecting all pci_dev lists.  Add spinlocks for
pci_dev access.  Do necessary modifications to MSI code.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
17 years agoRestructure VT-d device scope and PCI bridge handling
Keir Fraser [Fri, 4 Jul 2008 16:51:42 +0000 (17:51 +0100)]
Restructure VT-d device scope and PCI bridge handling

Create a bitmap for each device scope indicating which buses are
covered by the scope.  Upon mapping PCI-PCI bridges we now detect
whether we have a bridge to a non-PCIe bus.  If so, all devices mapped
on that bus are squashed to the requester-id of the bridge.  Bridges
to PCIe busses are ignored.  The requester-id squashing also
determines the iommu device group id for the device.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
17 years agoPCI device register/unregister + pci_dev cleanups
Keir Fraser [Fri, 4 Jul 2008 16:51:16 +0000 (17:51 +0100)]
PCI device register/unregister + pci_dev cleanups

Move pci_dev lists from hvm to arch_domain

Move the pci_dev list from hvm to arch_domain since PCI devs are no
longer hvm specific.  Also removed locking for pci_dev lists.  Will
reintroduce them later.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
17 years agostubdom: Remove obsolete patch files.
Keir Fraser [Fri, 4 Jul 2008 16:50:31 +0000 (17:50 +0100)]
stubdom: Remove obsolete patch files.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agostubdom: use host's gcc
Keir Fraser [Fri, 4 Jul 2008 16:47:11 +0000 (17:47 +0100)]
stubdom: use host's gcc

This makes stubdom use the host's gcc instead of downloading/compiling
binutils+gcc.  That requires a bunch of changes and even uncovered a
few bugs, but saves a lot of time.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agox86: MCA support.
Keir Fraser [Fri, 4 Jul 2008 15:27:44 +0000 (16:27 +0100)]
x86: MCA support.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
17 years agovgabios: upgrade to CVS version
Keir Fraser [Fri, 4 Jul 2008 12:02:31 +0000 (13:02 +0100)]
vgabios: upgrade to CVS version

cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/vgabios
co vgabios

Patchs backported:
  - vgabios: Support VESA power management extensions. (cs 17692)
  - x86, hvm: Allow Cirrus VGA BIOS to clear framebuffer with minimal
    PIO writes. (cs 16242)

This patch fixes the bug with the IDR boot CD.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
17 years agoCleanups to suspend-event-channel patches.
Keir Fraser [Fri, 4 Jul 2008 11:39:18 +0000 (12:39 +0100)]
Cleanups to suspend-event-channel patches.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoFix build.
Keir Fraser [Fri, 4 Jul 2008 11:20:19 +0000 (12:20 +0100)]
Fix build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoRevert incorrectly checked-in changes.
Keir Fraser [Fri, 4 Jul 2008 11:17:33 +0000 (12:17 +0100)]
Revert incorrectly checked-in changes.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoTeach xc_save to use event-channel-based domain suspend if available.
Keir Fraser [Fri, 4 Jul 2008 11:00:38 +0000 (12:00 +0100)]
Teach xc_save to use event-channel-based domain suspend if available.
If the guest provides a suspend event channel through xenstore,
xc_save will use it in preference to the old xenstore-based method.

Xend is still informed when the domain has suspended so that it can
perform device migration in parallel with last-round migration.

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
17 years agoAdd facility to get notification of domain suspend by event channel.
Keir Fraser [Fri, 4 Jul 2008 11:00:24 +0000 (12:00 +0100)]
Add facility to get notification of domain suspend by event channel.
This event channel will be notified when the domain transitions to the
suspended state, which can be much faster than raising VIRQ_DOM_EXC
and waiting for the notification to be propagated via xenstore.

No attempt is made here to prevent multiple subscribers (last one
wins), or to detect that the subscriber has gone away. Userspace tools
should take care.

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
17 years agoioemu: Support more Capability Structures (including MSI/MSI-X)
Keir Fraser [Fri, 4 Jul 2008 10:54:21 +0000 (11:54 +0100)]
ioemu: Support more Capability Structures (including MSI/MSI-X)
       and Device Specific Registers for pt device.

I implemented following Capability Structures and Device Specific
Registers.
    * Configuration Header Type 0
        -> emulation.
           "emulation" does not mean no accessing real I/O device.
           Access real I/O device, but guest value and real value
           might be different.
    * MSI Capability Structure
        -> emulation.
           Behavior is not changed from existed implementation in
           pt-msi.c, although code is changed.
    * MSI-X Capability Structure
        -> emulation.
           Behavior is not changed from existed implementation in
           pt-msi.c, although code is changed.
    * PCI Express Capability Structure
        -> emulation.
    * PCI Power Management Capability Structure
        -> emulation.
    * Vital Product Data Capability Structure
        -> emulation.
           Emulated register is only  Next Capability Pointer
    Register.
           All other registers are passthrough.
    * Vendor Specific Capability Structure
        -> emulation
           Emulated register is only  Next Capability Pointer
    Register.
           All other registers are passthrough.
    * Device Specific Register (exclude capability structures)
        -> passthrough.
           The device drivers in guest domain are allowed to access
           Device Specific Register. So various I/O device will work.

I assigned following device to guest domain, and they worked fine.
    - PCIe NIC (MSI)
    - PCI NIC (MSI)
    - UHCI (INTx interrupt)
    - IDE Controller (INTx interrupt)

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
17 years agox86: MSI interrupt storm avoidance.
Keir Fraser [Fri, 4 Jul 2008 10:51:59 +0000 (11:51 +0100)]
x86: MSI interrupt storm avoidance.
Signed-off-by: Shan Haitao <Haitao.shan@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agopvSCSI: xend changes
Keir Fraser [Thu, 3 Jul 2008 12:39:06 +0000 (13:39 +0100)]
pvSCSI: xend changes

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
17 years agoxm-test: Remove a policy reset from acm test case
Keir Fraser [Thu, 3 Jul 2008 10:32:10 +0000 (11:32 +0100)]
xm-test: Remove a policy reset from acm test case

Remove the resetting of the policy from this point in the test case
since the new default policy has the '__UNLABELED__' label, which is
not expected in subsequent checks.

Signed-off-by; Stefan Berger <stefanb@us.ibm.com>

17 years agovtpm: Add two missing quotes in the vTPM hotplug script.
Keir Fraser [Thu, 3 Jul 2008 10:31:40 +0000 (11:31 +0100)]
vtpm: Add two missing quotes in the vTPM hotplug script.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years agoioemu: Explicitly define certain PCI/MSI macros.
Keir Fraser [Thu, 3 Jul 2008 09:59:43 +0000 (10:59 +0100)]
ioemu: Explicitly define certain PCI/MSI macros.
From: Haitao Shan <haitao.shan@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoUpdate tboot tarfile to latest version in Trusted Boot SourceForge site
Keir Fraser [Thu, 3 Jul 2008 09:57:51 +0000 (10:57 +0100)]
Update tboot tarfile to latest version in Trusted Boot SourceForge site
Signed-off-by: Joseph Cihula <joseph.cihula@intel.com>
17 years ago[BUILD] Support cloning Linux tree from a git repository.
Keir Fraser [Thu, 3 Jul 2008 09:45:46 +0000 (10:45 +0100)]
[BUILD] Support cloning Linux tree from a git repository.

Integrate the linux-2.6-tip tree as linux-2.6-tip-latest

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
17 years agoSupport building of out-of-tree merged qemu from git
Keir Fraser [Thu, 3 Jul 2008 09:44:13 +0000 (10:44 +0100)]
Support building of out-of-tree merged qemu from git

This provides support for building the new merged qemu from
qemu-xen.git, or from a local checkout.

The default is still to use the in-tree version, because the patchman
infrastructure for testing, and propagation from staging to
xen-unstable, needs a small amount of work to cope with git.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
17 years agoXenAPI: Add Direct PCI Device (DPCI) Assignment Support
Keir Fraser [Thu, 3 Jul 2008 09:27:12 +0000 (10:27 +0100)]
XenAPI: Add Direct PCI Device (DPCI) Assignment Support

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
17 years agoXenAPI: Add Physical PCI Device (PPCI) Support
Keir Fraser [Thu, 3 Jul 2008 09:26:16 +0000 (10:26 +0100)]
XenAPI: Add Physical PCI Device (PPCI) Support

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
17 years agoiommu: Fix hvm_dpci_eoi for smp guest in ioapic interrupt mode
Keir Fraser [Wed, 2 Jul 2008 16:28:27 +0000 (17:28 +0100)]
iommu: Fix hvm_dpci_eoi for smp guest in ioapic interrupt mode

My testing shows, for some smp guests, ent->fields.mask will not be
unmasked when hvm_dpci_eoi() is invoked at the first time. In that
case, we should rely on timeout call back to do pirq_guest_eoi() and
should not stop the per-irq timer too early.

From: Wei Wang <wei.wang2@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agominios: PIRQ and MSI/MSI-X support
Keir Fraser [Wed, 2 Jul 2008 16:26:42 +0000 (17:26 +0100)]
minios: PIRQ and MSI/MSI-X support

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agox86 hvm: Fix RTC handling.
Keir Fraser [Wed, 2 Jul 2008 16:25:05 +0000 (17:25 +0100)]
x86 hvm: Fix RTC handling.
 1. Clean up initialisation/destruction.
 2. Better handle per-domain time-offset changes.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoDo not allow HVM save/restore of a dying domain.
Keir Fraser [Wed, 2 Jul 2008 16:10:52 +0000 (17:10 +0100)]
Do not allow HVM save/restore of a dying domain.

It's not a sensible thing to do, and it is easier than auditing all
state save/restore functions for safety (most importantly, racing
against domain_relinquish_resources).

Also place a spin_barrier on domain_lock after asserting d->is_dying,
allowing critical regions under the domain_lock to safely check
is_dying and avoid races with domain_relinquish_resources().

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agostubdom: PCI passthrough support via PV-PCI
Keir Fraser [Wed, 2 Jul 2008 12:54:20 +0000 (13:54 +0100)]
stubdom: PCI passthrough support via PV-PCI

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agopciif: do not depend on linux' msix_entries
Keir Fraser [Wed, 2 Jul 2008 12:37:16 +0000 (13:37 +0100)]
pciif: do not depend on linux' msix_entries

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agox86: Remove inline declaration to fix build.
Keir Fraser [Wed, 2 Jul 2008 09:56:37 +0000 (10:56 +0100)]
x86: Remove inline declaration to fix build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoioemu: Add check for mapping MSI pirqs.
Keir Fraser [Wed, 2 Jul 2008 08:45:18 +0000 (09:45 +0100)]
ioemu: Add check for mapping MSI pirqs.
From: Haitao Shan <haitao.shan@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86: Fix MSI cleanup.
Keir Fraser [Wed, 2 Jul 2008 08:44:09 +0000 (09:44 +0100)]
x86: Fix MSI cleanup.

Fixes bugzilla bug #1279.

From: Haitao Shan <haitao.shan@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoxend: Replace stray tab-indent with space-indent
Keir Fraser [Wed, 2 Jul 2008 08:42:37 +0000 (09:42 +0100)]
xend: Replace stray tab-indent with space-indent

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
17 years agomerge with xen-unstable.hg
Isaku Yamahata [Wed, 2 Jul 2008 02:30:37 +0000 (11:30 +0900)]
merge with xen-unstable.hg

17 years agominios: proper frees are now handled, so drop the FIXME comment
Keir Fraser [Tue, 1 Jul 2008 13:50:35 +0000 (14:50 +0100)]
minios: proper frees are now handled, so drop the FIXME comment

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agox86_emulate: (Almost) complete FPU emulation.
Keir Fraser [Tue, 1 Jul 2008 12:27:41 +0000 (13:27 +0100)]
x86_emulate: (Almost) complete FPU emulation.

Provide emulation for all FPU instructions except fsave/frstore &
fnstenv/fldenv.

While the main purpose of the patch is to avoid current and future
"gotchas" on FPU intructions used by various OS boot-loaders, it is
complete enough to run DOS realmode FPU applications and benchmarks,
but don't expect to set any speed records.

Signed-off-by: Trolle Selander <trolle.selander@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoVT-d: Fix queue invalidation
Keir Fraser [Tue, 1 Jul 2008 10:41:43 +0000 (11:41 +0100)]
VT-d: Fix queue invalidation

Correct invalidate_sync(), and clean up qinval_setup().

Signed-off-by: Weidong Han <weidong.han@intel.com>
17 years agoVT-d: Do CLFLUSH after updating IRTE entries
Keir Fraser [Tue, 1 Jul 2008 10:40:55 +0000 (11:40 +0100)]
VT-d: Do CLFLUSH after updating IRTE entries

Like root, context and DMA remap page table, interrupt remap table
also needs CLFLUSH after any update.

Signed-off-by: Weidong Han <weidong.han@intel.com>
17 years agoxenballoond (memory overcommit) scripts
Keir Fraser [Tue, 1 Jul 2008 10:40:07 +0000 (11:40 +0100)]
xenballoond (memory overcommit) scripts

See the README and conf files for more info.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
17 years agoioemu: limit xen-console buffering
Keir Fraser [Tue, 1 Jul 2008 10:38:51 +0000 (11:38 +0100)]
ioemu: limit xen-console buffering
Set dom->buffer.max_capacity to xend configured limit.

Signed-off-by: Pat Campbell <plc@novell.com>
17 years agoxend: open qemu-dm logfile in append mode if log rotation is disabled by config.
Keir Fraser [Tue, 1 Jul 2008 09:59:09 +0000 (10:59 +0100)]
xend: open qemu-dm logfile in append mode if log rotation is disabled by config.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
17 years agoxend: improve the rotation of qemu-dm logfiles.
Keir Fraser [Tue, 1 Jul 2008 09:58:43 +0000 (10:58 +0100)]
xend: improve the rotation of qemu-dm logfiles.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
17 years agox86_emulate: read/write/insn_fetch emulation hooks now all take a
Keir Fraser [Mon, 30 Jun 2008 13:19:09 +0000 (14:19 +0100)]
x86_emulate: read/write/insn_fetch emulation hooks now all take a
pointer to emulator data buffer, and an arbitrary byte count (up to
the size of a page of memory).

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoblktap: Fall back to libcrypto if libgcrypt is not installed.
Keir Fraser [Mon, 30 Jun 2008 10:39:10 +0000 (11:39 +0100)]
blktap: Fall back to libcrypto if libgcrypt is not installed.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agotools/python: fix TypeError for 17903:0728459b3c8d
Keir Fraser [Mon, 30 Jun 2008 09:02:21 +0000 (10:02 +0100)]
tools/python: fix TypeError for 17903:0728459b3c8d

If `hda' is used in domU config file and domain-0 has /dev/hda,
creating a domain failed by TypeError:

  File "//usr/lib/python/xen/xend/server/blkif.py", line 84, in
getDeviceDetails
    (device_path, devid) = blkif.blkdev_name_to_number(dev)
TypeError: unpack non-sequence

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
17 years agoFix up python breakage for blkdev_name_to_number
Keir Fraser [Mon, 30 Jun 2008 09:01:44 +0000 (10:01 +0100)]
Fix up python breakage for blkdev_name_to_number

Signed-off-by: Chris Lalancette <clalance@redhat.com>
17 years agoblktap: link against libgcrypt rather than libcrypto
Keir Fraser [Mon, 30 Jun 2008 09:00:53 +0000 (10:00 +0100)]
blktap: link against libgcrypt rather than libcrypto

tapdisk, part of blktap, links against libcrypto. tapdisk includes
GPLv2 (tapaio.c) and other licensed code (block-qcow.c). The license
of OpenSSL is considered incompatible with the GPL by many
people. This patch changes them to link against libgcrypt, which is
LGPL.

Signed-off-by: Bastian Blank <waldi@debian.org>
17 years agox86: Px statistic update for cpu idle time.
Keir Fraser [Mon, 30 Jun 2008 08:59:39 +0000 (09:59 +0100)]
x86: Px statistic update for cpu idle time.

Update px statistic, subtract cx idle time from px residency time.

Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
17 years agostubdom: add live migration support by having ioemu just notify the
Keir Fraser [Mon, 30 Jun 2008 08:57:27 +0000 (09:57 +0100)]
stubdom: add live migration support by having ioemu just notify the
hypervisor about memory changes.

The impact on disk performance is typically making it from 71.5MBps
down to 70.5Mbps during the live migration. The impact on network
performance is actually even hard to measure.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: fix libc-verbose non-lwip compilation
Keir Fraser [Mon, 30 Jun 2008 08:51:34 +0000 (09:51 +0100)]
stubdom: fix libc-verbose non-lwip compilation

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agox86: Fix 32-bit build after VT-d cleanups.
Keir Fraser [Sat, 28 Jun 2008 15:29:00 +0000 (16:29 +0100)]
x86: Fix 32-bit build after VT-d cleanups.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86: Fix 32-bit build.
Keir Fraser [Fri, 27 Jun 2008 16:54:27 +0000 (17:54 +0100)]
x86: Fix 32-bit build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86: Emulation of LMSW must only affect CR0 bits 0-3.
Keir Fraser [Fri, 27 Jun 2008 16:24:54 +0000 (17:24 +0100)]
x86: Emulation of LMSW must only affect CR0 bits 0-3.
Emulation of SMSW is only restricted to 16-bit operation on memory
operands.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agohvm: Fix lmsw handling
Keir Fraser [Fri, 27 Jun 2008 15:20:59 +0000 (16:20 +0100)]
hvm: Fix lmsw handling

The lmsw instruction can be used to set CR0_PE, but can never clear
it, once set.

Signed-off-by: Trolle Selander <trolle.selander@eu.citrix.com>
17 years agox86: Add cpufreq logic to S3 suspend/resume
Keir Fraser [Fri, 27 Jun 2008 15:16:47 +0000 (16:16 +0100)]
x86: Add cpufreq logic to S3 suspend/resume

When suspend to S3, stop the cpufreq dbs governor. When resume from
S3, firstly sync cpu state and freq at the 1st dbs timer; from 2nd dbs
timer on, cpufreq dbs governor control cpu px transfer according to
its workload algorithm. Px statistic is also handled.

Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
17 years agoUpdate changelog for xvd blkdev naming extensions.
Keir Fraser [Fri, 27 Jun 2008 15:12:14 +0000 (16:12 +0100)]
Update changelog for xvd blkdev naming extensions.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
17 years agotools/python: blkdev_name_to_number fixes
Keir Fraser [Fri, 27 Jun 2008 15:09:58 +0000 (16:09 +0100)]
tools/python: blkdev_name_to_number fixes

Rework blkdev_name_to_number to allow the tools to attach xvd disks
beyond xvdp.

 1.  Adds the handling for the /dev/xvd[q-z] and /dev/xvd[a-i][a-z]
     extended devices

 2.  Changes blkdev_name_to_number() to return a tuple of (xenbus,
     devnum), and then deals with the resulting fallout.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
17 years agoblktap: Extend userland busid to 32 bits
Keir Fraser [Fri, 27 Jun 2008 15:08:56 +0000 (16:08 +0100)]
blktap: Extend userland busid to 32 bits

Signed-off-by: Chris Lalancette <clalance@redhat.com>
17 years agohvm rombios: Move function calls out of 'post' function section
Keir Fraser [Fri, 27 Jun 2008 13:43:29 +0000 (14:43 +0100)]
hvm rombios: Move function calls out of 'post' function section

Through recent additions to the rombios the code section of the post
function has filled up considerably. When I enable the BX_TCGBIOS
compile time option the BIOS crashes since the post section code
(starts at $e05b) spills over into the nmi entry point (starts at
$e2c3). as86 doesn't cause an error when building.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years agovt-d: Clean up variable types and remove useless variables
Keir Fraser [Fri, 27 Jun 2008 13:40:47 +0000 (14:40 +0100)]
vt-d: Clean up variable types and remove useless variables

Signed-off-by: Weidong Han <weidong.han@intel.com>
17 years agoshadow: Re-initialise page_info's lock field when freeing shadow pages.
Keir Fraser [Fri, 27 Jun 2008 13:38:41 +0000 (14:38 +0100)]
shadow: Re-initialise page_info's lock field when freeing shadow pages.

Fixes boot failure of xenU after destroying a HVM guest.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoioemu: Clean up after cset 17646:e3b13e1ecf6c
Keir Fraser [Fri, 27 Jun 2008 13:16:53 +0000 (14:16 +0100)]
ioemu: Clean up after cset 17646:e3b13e1ecf6c

Remove redundant code.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
17 years agohvmloader: Set up any Intel ICH for legacy IDE.
Keir Fraser [Fri, 27 Jun 2008 13:15:11 +0000 (14:15 +0100)]
hvmloader: Set up any Intel ICH for legacy IDE.
Signed-off-by: Li Zhang <li.zhang@intel.com>
17 years agovt-d: Minor fixing of interrupt remapping
Keir Fraser [Fri, 27 Jun 2008 13:11:41 +0000 (14:11 +0100)]
vt-d: Minor fixing of interrupt remapping
When ir_ctrl->iremap_index == -1, it means there is no remap
entry. So it needn't to convert from remap format to normal ioapic
format.

Signed-off-by: Weidong Han <weidong.han@intel.com>
17 years agotapdisk: Fix qcow2 for images > 2 GB
Keir Fraser [Fri, 27 Jun 2008 13:03:52 +0000 (14:03 +0100)]
tapdisk: Fix qcow2 for images > 2 GB

Signed-off-by: Kevin Wolf <kwolf@suse.de>
17 years agox86, shadow: Fix OOS bug on domain teardown.
Keir Fraser [Fri, 27 Jun 2008 12:45:55 +0000 (13:45 +0100)]
x86, shadow: Fix OOS bug on domain teardown.
Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
17 years agoPV-GRUB: fix reiserfs 64bit support
Keir Fraser [Fri, 20 Jun 2008 17:42:45 +0000 (18:42 +0100)]
PV-GRUB: fix reiserfs 64bit support

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoOut-of-sync L1 shadows: always unsync pages on guest writes.
Keir Fraser [Fri, 20 Jun 2008 17:41:50 +0000 (18:41 +0100)]
Out-of-sync L1 shadows: always unsync pages on guest writes.

Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
17 years agoOut-of-sync L1 shadows: OOS snapshot.
Keir Fraser [Fri, 20 Jun 2008 17:41:09 +0000 (18:41 +0100)]
Out-of-sync L1 shadows: OOS snapshot.

Make snapshots of guest pages on unsync to allow faster revalidation
of OOS pages.

Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
17 years agoOut-of-sync L1 shadows: Fixup Tables
Keir Fraser [Fri, 20 Jun 2008 17:40:32 +0000 (18:40 +0100)]
Out-of-sync L1 shadows: Fixup Tables

This patch implement a very simple non complete reverse map for OOS
pages writable mappings to avoid shadow brute-force search on resyncs.

Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
17 years agoOut-of-sync L1 shadows: OOS base
Keir Fraser [Fri, 20 Jun 2008 17:39:45 +0000 (18:39 +0100)]
Out-of-sync L1 shadows: OOS base

This patch implements the basic mechanisms to get pagetables out of
sync and back in sync again.

Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
Signed-off-by: Tim Deegan <tim.deegan@eu.citrix.com>
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
17 years agoPV-GRUB: compilation fix caused by 17880
Keir Fraser [Fri, 20 Jun 2008 17:37:29 +0000 (18:37 +0100)]
PV-GRUB: compilation fix caused by 17880

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoAMD PowerNow! in Xen
Keir Fraser [Fri, 20 Jun 2008 17:02:46 +0000 (18:02 +0100)]
AMD PowerNow! in Xen

This patch set moves support for AMD's PowerNow! technology from
dom0 into the hypervisor, now that there is support for
transferring ACPI data to the hypervisor.  It will only work for
AMD processors that support the architectural P-state driver,
such as 3rd generation Opterons, Phenoms, and Turion Ultras.

This patch creates the Architectural P-state driver inside
of the Xen hypervisor and hooks it into the Xen code.  It
has been tested at AMD with a variety of para- and fully-
virtualized guests for a week without regressions.

Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
Acked-by: Conny Seidel <conny.seidel@amd.com>
17 years agominios: fix add_id_to_freelist(0)
Keir Fraser [Fri, 20 Jun 2008 16:45:23 +0000 (17:45 +0100)]
minios: fix add_id_to_freelist(0)

add_id_to_freelist(0) would make get_id_from_freelist() always return 0.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: do not systematically free the page under shared info, as the
Keir Fraser [Fri, 20 Jun 2008 16:44:50 +0000 (17:44 +0100)]
minios: do not systematically free the page under shared info, as the
guest booted by PV-GRUB will need it.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoClean up domain_create() interface.
Keir Fraser [Fri, 20 Jun 2008 14:21:26 +0000 (15:21 +0100)]
Clean up domain_create() interface.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>